#include<iostream>
#include<string>
using namespace std;
string s;
int n;
int main()
{
	cin >> n >> s;
	int ans = 0;
	for (int i = 0; i < n; i++) {
		if (s[i] == 'x') {
			int j = i + 1;
			while (j < n && s[j] == 'x') j++;
			ans += max(0, j - i - 2);
			i = j - 1;
		}
	}
	cout << ans << endl;
	return 0;
}